import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

//导入组件,路径必须以./开始
import t1 from '../components/t1.vue'
import t2 from '../components/t1.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/t1',
      name: 't1',
      component: t1
    },
    {
      path: '/t2',
      name: 't2',
      component: t2
    }
  ]
})
